<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>系统登录 - "航行有你"用户&&航班管理系统</title>
    <link rel="stylesheet" href="css/style.css"/>
<%--    <link rel="stylesheet" href="css/a.css">--%>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <script src="js/a.js" defer></script>


<%--    <script type="text/javascript">--%>
<%--        window.onload = function() {--%>
<%--            var urlParams = new URLSearchParams(window.location.search);--%>
<%--            var success = urlParams.get("s");--%>
<%--            if (success === "t") {--%>
<%--                alert("密码修改成功，请点击确认返回登录页面。");--%>
<%--                document.getElementById("returnLogin").onclick = function() {--%>
<%--                    window.location.href = "index.jsp"; // 设置点击确认后的跳转页面--%>

<%--                };--%>
<%--                document.getElementById("alertBox").style.display = "block";--%>
<%--            }--%>
<%--        };--%>
    </script>
    </script>
    <script type="text/javascript">
        window.onload = function() {
            var urlParams = new URLSearchParams(window.location.search);
            var success = urlParams.get("success");
            if (success === "t") {
                alert("操作成功，请点击确认返回登录页面。");
                document.getElementById("returnLogin").onclick = function() {
                    window.location.href = "index.jsp"; // 设置点击确认后的跳转页面

                };
                document.getElementById("alertBox").style.display = "block";
            }
        };
    </script>

</head>

<body class="login_bg">
<section class="loginBox">
    <header class="loginHeader">
        <h1 style="font-size: 32px;">"航行有你"用户&&航班管理系统</h1>

    </header>
    <section class="loginCont">
        <form class="loginForm" action="/LoginServlet" method="post">
            <p><span style="color: firebrick"> ${error}</span> </p>
            <div class="inputbox">
                <label for="user">用户名：</label>
                <input id="user" type="text" name="username" placeholder="请输入用户名" required/>
            </div>
            <div class="inputbox">
                <label for="mima">密码：</label>
                <input id="mima" type="password" name="password" placeholder="请输入密码" required/>
            </div>
            <div class="subBtn">
                <input type="submit" value="登录" />
                <input type="reset" value="重置"/>
                <br>
<%--                <a href="register.jsp">没有账号？</a>--%>

            </div>
            <div style="float: left;">
                <a href="register.jsp">没有账号？</a>
            </div>
        </form>
    </section>
</section>
</body>
</html>